﻿using FreeSql.DataAnnotations;
using MySqlX.XDevAPI.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhonTai.Admin.Core.Entities;
using ZhonTai.Industry.Contracts.Core.Enums;

namespace ZhonTai.Industry.Domain.GenericBinding
{
    /// <summary>
    /// 通用绑定
    /// </summary>
    [Table(Name = "prd_generic_binding")]
    [Index("idx_generic_binding_created_codeA_status", nameof(CodeA) + "," + nameof(Status))]
    public class GenericBindingEntity : EntityBase
    {
        /// <summary>
        /// 工站Id
        /// </summary>
        public long StationId { get; set; }

        /// <summary>
        /// 标识
        /// </summary>
        public string? Label { get; set; }

        /// <summary>
        /// 绑定类型
        /// </summary>
        public string? BindingType { get; set; }

        /// <summary>
        /// 代码A
        /// </summary>
        public string? CodeA { get; set; }

        /// <summary>
        /// 代码B
        /// </summary>
        public string? CodeB { get; set; }

        /// <summary>
        /// 扩展(计数)
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// 扩展
        /// </summary>
        public string? Metadata { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public StatusEnum Status { get; set; } = StatusEnum.Close;
    }
}